<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="author" content="lcx">
    <title>鼠标放上去显示遮罩层</title>
    <script src="jquery-3.1.1.js"></script>
    <style>
        * {
            box-sizing: border-box;
        }
        
        body,
        html {
            width: 100%;
            height: 100%;
            background-color: #ccc;
        }
        
        header {
            width: 400px;
            height: 760px;
            margin: 0 auto;
            background-color: white;
            position: relative;
        }
        
        .header-border {
            width: 400px;
            height: 760px;
            border: 4px solid orange;
            position: absolute;
            top: 0;
            left: 0;
        }
        
        header img {
            width: 400px;
            height: 600px;
            padding: 10px;
        }
        
        header section {
            width: 400px;
            text-align: left;
            line-height: 30px;
            padding-left: 24px;
            font-size: 14px;
        }
        
        #outer {
            width: 400px;
            height: 260px;
            margin: 0 auto;
            background-color: white;
            margin-top: 15px;
        }
        
        #outer img {
            width: 180px;
            height: 210px;
        }
        
        #outer .outer-left {
            margin: 10px;
            width: 180px;
            height: 210px;
            position: relative;
            float: left;
            overflow: hidden;
        }
        
        #outer .outer-right {
            margin: 10px;
            width: 180px;
            position: relative;
            float: right;
            overflow: hidden;
        }
        
        #inner-div1 {
            width: 180px;
            height: 210px;
            background-color: #666;
            color: white;
            position: absolute;
            left: -100px;
            top: 0px;
        }
        
        #inner-div2 {
            width: 180px;
            height: 210px;
            background-color: #666;
            color: white;
            opacity: 0.5;
            position: absolute;
            left: -100px;
            top: 0px;
        }
        
        #outer p {
            margin-left: 10px;
            font-size: 14px;
        }
    </style>
</head>

<body>
    <header>
        <div class="header-border" style="display: none">
        </div>
        <img src="img/b1.jpg" alt="">
        <section>【金禧】设计上运用了多片层叠设计，形成立体倒放的花苞<br>视觉效果，创意独特。浓烈的印花明快的色彩勾勒出美妙的<br>夏日异国情调，优质雪纺面料让小衫更显质感穿着凉爽透<br>气，做工也相当考究。</section>

    </header>
    <div id="outer">
        <div class="outer-left">
            <img src="img/b3.jpg" alt="">
            <div id="inner-div1" style="display: none">
                <p>special品牌旗舰店</p><br>
                <p>最具传奇浪漫色彩的欧洲</p>
                <p>经典设计，给你带来专属</p>
                <p>的魅力</p>
            </div>
        </div>
        <div class="outer-right">
            <img src="img/b2.jpg" alt="">
            <div id="inner-div2" style="display: none">
                <p>sophy橡菲旗舰店</p><br>
                <p>新款韩版微笑性感红唇上</p>
                <p>衣圆领女袖修身T恤</p>
            </div>
        </div>
    </div>
</body>

</html>
<script>
    $('header').mouseenter(function () {
        $('.header-border').fadeIn(2000)
    
    })
 $('header').mouseleave(function () {
        $('.header-border').fadeOut(2000)
        })








    $('.outer-left').mouseenter(function () {
        $('#inner-div1').css('display', 'block')
            .animate(
            {
                'left': '0px',
                'opacity': '0.5',
            }, 200);
    })
    $('.outer-left').mouseleave(function () {
        $('#inner-div1').animate(
            {
                'left': '-180px',
                'opacity': ' 0.5',
            }, 200);
    })

    $('.outer-right').mouseenter(function () {
        $('#inner-div2').css('display', 'block')
            .animate(
            {
                'left': '0px',
                'opacity': '0.5',
            }, 200);
    })
    $('.outer-right').mouseleave(function () {
        $('#inner-div2').animate(
            {
                'left': '-180px',
                'opacity': ' 0.5',
            }, 200);
    })

</script>